home *** CD-ROM | disk | FTP | other *** search
/ Champak 128 / Vol 128 (Damaged).iso / games / fire_it_.swf / scripts / __Packages / #6.as < prev    next >
Encoding:
Text File  |  2011-03-26  |  11.9 KB  |  443 lines

  1. class ┬º#6┬º extends ┬º#21┬º
  2. {
  3.    static var ┬º#3┬º = false;
  4.    static var ┬º#33┬º = 0;
  5.    static var ┬º#310┬º = 1;
  6.    static var ┬º#335┬º = 2;
  7.    static var ┬º#336┬º = 3;
  8.    static var ┬º#171┬º = 4;
  9.    static var ┬º#159┬º = 5;
  10.    static var ┬º#215┬º = 6;
  11.    static var ┬º#220┬º = 7;
  12.    static var ┬º#157┬º = 8;
  13.    static var ┬º#160┬º = 9;
  14.    static var ┬º#148┬º = ["#151","Walk Y","Walk Y","Walk left","Walk right","Center jump","Left angle jump","Left side jump","Right angle jump","Right side jump"];
  15.    var ┬º#7┬º = 0;
  16.    static var ┬º#269┬º = [undefined,"22","42","53"];
  17.    var ┬º#264┬º = 0.6;
  18.    static var ┬º#139┬º = 125;
  19.    var ┬º#398┬º = 50;
  20.    var ┬º#402┬º = 24;
  21.    var ┬º#432┬º = 4;
  22.    var ┬º#47┬º = false;
  23.    var ┬º#94┬º = false;
  24.    var ┬º#57┬º = false;
  25.    var ┬º#114┬º = 0;
  26.    var ┬º#274┬º = false;
  27.    var ┬º#194┬º = 0;
  28.    var ┬º#175┬º = 0;
  29.    var size = 1;
  30.    var scale = eval("#6")["#139"];
  31.    var ┬º#55┬º = 0;
  32.    var ┬º#13┬º = undefined;
  33.    function ┬º#6┬º()
  34.    {
  35.       super();
  36.       this["#149"] = this._x;
  37.       this["#100"] = this._y;
  38.       _root["#11"]._visible = false;
  39.    }
  40.    function ┬º#2┬º()
  41.    {
  42.       return "Player (f" + this._currentframe + "/" + this._totalframes + " s" + this["#7"] + " " + this["#34"]() + "):  ";
  43.    }
  44.    function toString()
  45.    {
  46.       return "[Player id: " + this["#56"] + "(" + eval("#6")["#269"][this["#56"]] + ")" + ", x: " + this.x + ", y: " + this.y + ", state: " + this["#7"] + ", jumping: " + this["#47"] + ", startJump: " + this["#94"] + ", holding: " + this["#57"] + ", lastMove: " + this["#114"] + ", frame: " + this._currentframe + "/" + this._totalframes + "]";
  47.    }
  48.    function setID(┬º#56┬º)
  49.    {
  50.       if(eval("#6")["#3"])
  51.       {
  52.          eval("#0").log(this["#2"]() + "set player id to " + ┬º#56┬º);
  53.       }
  54.       this["#56"] = ┬º#56┬º;
  55.       this.s = this.getSpeed();
  56.       this["#135"]();
  57.       this["#82"]();
  58.       if(┬º#56┬º == 3)
  59.       {
  60.          this.size = 1.12;
  61.       }
  62.       this["#99"]();
  63.       if(eval("#6")["#3"])
  64.       {
  65.          eval("#0").log(this["#2"]() + "set player scale to " + this._xscale);
  66.       }
  67.       this["#13"] = new ┬º#140┬º(10);
  68.       if(eval("#6")["#3"])
  69.       {
  70.          eval("#0").log("created " + this.toString());
  71.       }
  72.    }
  73.    function getSpeed()
  74.    {
  75.       return 7 + _root["#4"]["#328"];
  76.    }
  77.    function getShot()
  78.    {
  79.       return _root["#4"]["#342"];
  80.    }
  81.    function getPower()
  82.    {
  83.       if(this["#56"] == 1)
  84.       {
  85.          return 0.046;
  86.       }
  87.       if(this["#56"] == 2)
  88.       {
  89.          return 0.05;
  90.       }
  91.       return 0.06;
  92.    }
  93.    function ┬º#45┬º()
  94.    {
  95.       this.removeMovieClip();
  96.    }
  97.    function update(┬º#16┬º)
  98.    {
  99.       if(this.numbers != undefined)
  100.       {
  101.          var _loc3_ = eval("#6")["#269"][this["#56"]];
  102.          if(this["#7"] == eval("#6")["#215"] || this["#7"] == eval("#6")["#220"])
  103.          {
  104.             _loc3_ += " left";
  105.          }
  106.          else if(this["#7"] == eval("#6")["#157"] || this["#7"] == eval("#6")["#160"])
  107.          {
  108.             _loc3_ += " right";
  109.          }
  110.          else
  111.          {
  112.             _loc3_ += " center";
  113.          }
  114.          this.numbers.gotoAndStop(_loc3_);
  115.       }
  116.       var _loc5_ = Bounds["#119"](this.x,this.y);
  117.       if(_loc5_ == undefined)
  118.       {
  119.          eval("#0").log(this["#2"]() + "y bound is undefined");
  120.       }
  121.       else
  122.       {
  123.          this.y = _loc5_;
  124.       }
  125.       this._y = this.y;
  126.       var _loc6_ = Bounds["#118"](this.x,this.y);
  127.       if(_loc6_ == undefined)
  128.       {
  129.          eval("#0").log(this["#2"]() + "x bound is undefined");
  130.       }
  131.       else
  132.       {
  133.          this.x = _loc6_;
  134.       }
  135.       this._x = this.x;
  136.       var _loc8_ = this["#100"] - Bounds.getYMin();
  137.       var _loc7_ = this["#100"] - this._y;
  138.       this.scale = eval("#6")["#139"] - (eval("#6")["#139"] - 100) * (_loc7_ / _loc8_);
  139.       this["#99"]();
  140.       if(this["#11"]._visible)
  141.       {
  142.          this["#11"].update();
  143.          var _loc4_ = this.getBallLocation();
  144.          this["#13"].update(_loc4_.x,_loc4_.y,this["#11"]._alpha);
  145.       }
  146.       else
  147.       {
  148.          _root["#11"].update();
  149.          this["#13"].update(_root["#11"]._x,_root["#11"]._y,_root["#11"]._alpha);
  150.       }
  151.    }
  152.    function ┬º#449┬º()
  153.    {
  154.       if(this.onFire)
  155.       {
  156.          this.tint += this["#98"];
  157.          if(this.tint > this["#264"])
  158.          {
  159.             this.tint = this["#264"];
  160.             this["#98"] = - this["#98"];
  161.          }
  162.          else if(this.tint < 0)
  163.          {
  164.             this.tint = 0;
  165.             this["#98"] = - this["#98"];
  166.          }
  167.          this.setTint(this["#11"],this.tint);
  168.       }
  169.    }
  170.    function setTint(┬º#240┬º, d)
  171.    {
  172.       var _loc2_ = new Color(┬º#240┬º);
  173.       var _loc1_ = new Object();
  174.       _loc1_.rb = (1 - d) * 255;
  175.       _loc1_.gb = d * 180;
  176.       _loc2_.setTransform(_loc1_);
  177.    }
  178.    function ┬º#422┬º(┬º#240┬º)
  179.    {
  180.       var _loc2_ = new Color(┬º#240┬º);
  181.       var _loc1_ = {rb:0,gb:0};
  182.       _loc2_.setTransform(_loc1_);
  183.    }
  184.    function setSkinColor(┬º#240┬º, d)
  185.    {
  186.       var _loc3_ = new Color(┬º#240┬º);
  187.       var _loc2_ = {rb:d,gb:d,bb:d,ab:0,ra:100,ga:100,ba:100,aa:100};
  188.       _loc3_.setTransform(_loc2_);
  189.    }
  190.    function getBallLocation()
  191.    {
  192.       var _loc2_ = {x:this["#11"]._x,y:this["#11"]._y};
  193.       this.localToGlobal(_loc2_);
  194.       return _loc2_;
  195.    }
  196.    function ┬º#129┬º()
  197.    {
  198.       eval("#1").getInstance()["#20"](eval("#1")["#195"]);
  199.    }
  200.    function ┬º#113┬º()
  201.    {
  202.       this["#194"] = getTimer();
  203.       if(eval("#6")["#3"])
  204.       {
  205.          eval("#0").log(this["#2"]() + "reached top of jump at time " + this["#194"]);
  206.       }
  207.    }
  208.    function ┬º#307┬º()
  209.    {
  210.       if(!this.onFire)
  211.       {
  212.          if(eval("#6")["#3"])
  213.          {
  214.             eval("#0").log(this["#2"]() + "start hot streak");
  215.          }
  216.          _root["#193"]["#254"]("You\'re on fire!");
  217.       }
  218.       this.onFire = true;
  219.       this["#98"] = 0.1;
  220.       this.tint = 0;
  221.       this["#13"]["#345"]();
  222.       this["#11"].gotoAndPlay("Fire");
  223.       _root["#11"].gotoAndPlay("Fire");
  224.    }
  225.    function ┬º#135┬º()
  226.    {
  227.       if(eval("#6")["#3"])
  228.       {
  229.          eval("#0").log(this["#2"]() + "stop hot streak");
  230.       }
  231.       this.onFire = false;
  232.       this.tint = 0;
  233.       this["#98"] = 0;
  234.       this["#13"]["#262"]();
  235.       this["#11"].gotoAndStop("#276");
  236.       _root["#11"].gotoAndStop("#276");
  237.    }
  238.    function ┬º#117┬º()
  239.    {
  240.       if(eval("#6")["#3"])
  241.       {
  242.          eval("#0").log(this["#2"]() + "end jump");
  243.       }
  244.       this.stop();
  245.    }
  246.    function hitTest(clip)
  247.    {
  248.       return this["#255"].hitTest(clip);
  249.    }
  250.    function ┬º#344┬º()
  251.    {
  252.       if(eval("#6")["#3"])
  253.       {
  254.          eval("#0").log(this["#2"]() + "return ball");
  255.       }
  256.       this["#47"] = false;
  257.       this["#94"] = false;
  258.       this["#57"] = false;
  259.       _root["#11"]._visible = false;
  260.       this["#11"]._visible = true;
  261.       this["#8"](eval("#6")["#33"]);
  262.    }
  263.    function ┬º#82┬º()
  264.    {
  265.       this._x = this["#149"];
  266.       this._y = this["#100"];
  267.       this.x = this["#149"];
  268.       this.y = this["#100"];
  269.       this.scale = eval("#6")["#139"];
  270.       this["#99"]();
  271.    }
  272.    function ┬º#99┬º()
  273.    {
  274.       this._xscale = this.scale * this.size;
  275.       this._yscale = this.scale * this.size;
  276.    }
  277.    function ┬º#382┬º(┬º#190┬º)
  278.    {
  279.       this.y -= this.s;
  280.       this["#8"](eval("#6")["#310"]);
  281.       if(┬º#190┬º)
  282.       {
  283.          return undefined;
  284.       }
  285.       eval("#1").getInstance()["#20"](eval("#1")["#116"]);
  286.       this["#114"] = getTimer();
  287.    }
  288.    function ┬º#367┬º(┬º#190┬º)
  289.    {
  290.       this.y += this.s;
  291.       this["#8"](eval("#6")["#335"]);
  292.       if(┬º#190┬º)
  293.       {
  294.          return undefined;
  295.       }
  296.       eval("#1").getInstance()["#20"](eval("#1")["#116"]);
  297.       this["#114"] = getTimer();
  298.    }
  299.    function ┬º#368┬º(┬º#190┬º)
  300.    {
  301.       this["#8"](eval("#6")["#336"]);
  302.       eval("#1").getInstance()["#20"](eval("#1")["#116"]);
  303.       this.x -= this.s;
  304.       this["#114"] = getTimer();
  305.    }
  306.    function ┬º#391┬º()
  307.    {
  308.       if(!this["#47"])
  309.       {
  310.          this["#8"](eval("#6")["#33"]);
  311.       }
  312.    }
  313.    function ┬º#351┬º(┬º#190┬º)
  314.    {
  315.       this["#8"](eval("#6")["#171"]);
  316.       eval("#1").getInstance()["#20"](eval("#1")["#116"]);
  317.       this.x += this.s;
  318.       this["#114"] = getTimer();
  319.    }
  320.    function ┬º#392┬º()
  321.    {
  322.       if(!this["#47"])
  323.       {
  324.          this["#47"] = true;
  325.          this["#94"] = true;
  326.          this["#57"] = true;
  327.          this["#55"] = eval("#14").getAngle(this._x,this._y,_root["#35"]._x,Bounds.getYMin() - 10);
  328.          this["#55"] = eval("#14")["#299"](this["#55"]) - 180;
  329.          var _loc6_ = 15;
  330.          var _loc4_ = 45;
  331.          if((this["#55"] < _loc4_ || this["#55"] > 180 - _loc4_) && this._y < Bounds.getYMin() + 100 * eval("#5").scale)
  332.          {
  333.             var _loc3_ = _root["#4"]["#9"]._x - _root["#42"]._x;
  334.             var _loc5_ = _root["#4"]["#9"]._width * eval("#5").scale / 2;
  335.             if(Math.abs(_loc3_) < _loc5_)
  336.             {
  337.                if(eval("#6")["#3"])
  338.                {
  339.                   eval("#0").log("too close to net: " + _loc3_ + "/" + _loc5_);
  340.                }
  341.                if(_loc3_ < 0)
  342.                {
  343.                   this.x -= _loc5_ + _loc3_;
  344.                }
  345.                else
  346.                {
  347.                   this.x += _loc5_ - _loc3_;
  348.                }
  349.             }
  350.          }
  351.          if(this["#55"] < _loc6_)
  352.          {
  353.             this["#8"](eval("#6")["#160"]);
  354.          }
  355.          else if(this["#55"] < _loc4_)
  356.          {
  357.             this["#8"](eval("#6")["#157"]);
  358.          }
  359.          else if(this["#55"] < 180 - _loc4_)
  360.          {
  361.             this["#8"](eval("#6")["#159"]);
  362.          }
  363.          else if(this["#55"] < 180 - _loc6_)
  364.          {
  365.             this["#8"](eval("#6")["#215"]);
  366.          }
  367.          else
  368.          {
  369.             this["#8"](eval("#6")["#220"]);
  370.          }
  371.       }
  372.       if(eval("#6")["#3"])
  373.       {
  374.          eval("#0").log(this["#2"]() + "already jumping");
  375.       }
  376.       return undefined;
  377.    }
  378.    function ┬º#205#10┬º()
  379.    {
  380.       if(this["#94"] && this["#47"] && this["#57"])
  381.       {
  382.          this["#175"] = getTimer();
  383.          if(eval("#6")["#3"])
  384.          {
  385.             eval("#0").log(this["#2"]() + "released space bar at time " + this["#175"]);
  386.          }
  387.          _root["#4"]["#112"] = _root["#4"]["#112"] + 1;
  388.          this["#57"] = false;
  389.          this["#94"] = false;
  390.       }
  391.    }
  392.    function ┬º#115┬º()
  393.    {
  394.       if(eval("#6")["#3"])
  395.       {
  396.          eval("#0").log(this["#2"]() + "shooting ball now");
  397.       }
  398.       var _loc3_ = this.getBallLocation();
  399.       _root["#11"]._x = _loc3_.x;
  400.       _root["#11"]._y = _loc3_.y;
  401.       this["#11"]._visible = false;
  402.       _root["#11"]._visible = true;
  403.       _root["#11"]["#8"](eval("#10")["#172"]);
  404.       if(this["#57"])
  405.       {
  406.          _root["#4"]["#112"] = _root["#4"]["#112"] + 1;
  407.          this["#57"] = false;
  408.          this["#94"] = false;
  409.       }
  410.    }
  411.    function ┬º#8┬º(┬º#97┬º)
  412.    {
  413.       if(┬º#97┬º == this["#7"])
  414.       {
  415.          return undefined;
  416.       }
  417.       if(eval("#6")["#3"] && (this["#7"] > eval("#6")["#171"] || ┬º#97┬º > eval("#6")["#171"]))
  418.       {
  419.          eval("#0").log(this["#2"]() + "changing to state " + ┬º#97┬º + ": " + eval("#6")["#148"][┬º#97┬º]);
  420.       }
  421.       if(this["#7"] < eval("#6")["#159"] && ┬º#97┬º < eval("#6")["#159"])
  422.       {
  423.          var _loc5_ = this.getOffsetFromLabel(eval("#6")["#148"][this["#7"]]);
  424.          var _loc3_ = this.getFrameForLabel(eval("#6")["#148"][┬º#97┬º]);
  425.          var _loc4_ = _loc3_ + _loc5_;
  426.          this.gotoAndPlay(_loc4_);
  427.       }
  428.       else
  429.       {
  430.          this.gotoAndPlay(eval("#6")["#148"][┬º#97┬º]);
  431.       }
  432.       if(┬º#97┬º == eval("#6")["#157"] || ┬º#97┬º == eval("#6")["#160"])
  433.       {
  434.          this["#274"] = true;
  435.       }
  436.       else
  437.       {
  438.          this["#274"] = false;
  439.       }
  440.       this["#7"] = ┬º#97┬º;
  441.    }
  442. }
  443.